package com.runa.protocol.dto;

public abstract class DtuRequestData {

    public String dtuID;

    protected IRequestData<byte[]> requestData;


    public DtuRequestData(String dtuID, IRequestData requestData) {
        this.dtuID = dtuID;
        this.requestData = requestData;
    }

    public short getTransSign() {
        return requestData.getTransSign();
    }

    public void setTransSign(short transSign) {
        requestData.setTransSign(transSign);
    }

    public boolean isReadWrite() {
        return requestData.isReadWrite();
    }

    public boolean check(IResponseData responseData) {
        try {
            return requestData.check(responseData);
        } catch (Exception e){
            
        }
        return false;
    }

    public boolean isHaveResult() {
        return requestData.isHaveResult();
    }


    public void setRequestData(IRequestData<byte[]> requestData) {
        this.requestData = requestData;
    }
}
